<form id="add-form" class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST" action="">
    <input id="staffid" name="row[staff_id]" type="text" class="hidden" value="{$staffid}">
    <div class="form-group">
        <label for="username" class="control-label col-xs-12 col-sm-2">{:__('用户名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="username" class="form-control" name="row[username]" type="text" value="" data-rule="required" >
        </div>
    </div>
    <div class="form-group">
        <label for="createtime" class="control-label col-xs-12 col-sm-2">{:__('评论时间')}:</label>
        <div class="col-xs-12 col-sm-4">
            <input type="text" class="form-control datetimepicker" id="createtime" name="row[createtime]" value="" data-date-format="YYYY-MM-DD" data-rule="{:__('createtime')}:required" size="6" />
        </div>
    </div>
    <div class="form-group">
        <label for="weight" class="control-label col-xs-12 col-sm-2">{:__('权重')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="weight" class="form-control" name="row[weight]" type="number" value="" data-rule="required" >
        </div>
    </div>

    <div class="form-group">
        <label for="context" class="control-label col-xs-12 col-sm-2">{:__('评论内容')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="context" class="form-control" name="row[context]" type="text" value="" data-rule="required" >
        </div>
    </div>
    <div class="form-group">
        <label for="c-images" class="control-label col-xs-12 col-sm-2">{:__('图片')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="form-inline">
                <input id="c-images" class="form-control" size="50" name="images" type="text" value="" data-rule="required"><br>
                <span><button id="plupload-images" class="btn btn-danger plupload" data-mimetype="jpg" data-multiple="true" data-input-id="c-images" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                <ul class="row list-inline plupload-preview" id="p-images"></ul>
            </div>
        </div>
    </div>
    <h3>评价等级</h3>
    {volist name="ranktypelist" id="vo"}
    <div class="form-group">
        <label for="ranktype{$vo.id}" class="control-label col-xs-12 col-sm-2">{$vo.name}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="ranktype{$vo.id}" class="form-control" name="rank[{$vo.id}]" type="number" value="" data-rule="required" >
        </div>
    </div>
    {/volist}

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
